package com.bank.entity;

import java.io.Serializable;

import javax.persistence.Embeddable;

@Embeddable  
public class TransAccountListKey  implements  Serializable {
	private static final long serialVersionUID = 6126251404115974790L;
	
	private String trans_workdate     ; /*交易日期*/ 
	private String teller_serno;/*柜员流水*/
	private String  sequence;   /*顺序号*/
	
	public TransAccountListKey() { 
		
	} 
	
	
	public TransAccountListKey(String trans_workdate, String teller_serno, String sequence) {
		super();
		this.trans_workdate = trans_workdate;
		this.teller_serno = teller_serno;
		this.sequence = sequence;
	}
	public String getTrans_workdate() {
		return trans_workdate;
	}
	public void setTrans_workdate(String trans_workdate) {
		this.trans_workdate = trans_workdate;
	}
	public String getTeller_serno() {
		return teller_serno;
	}
	public void setTeller_serno(String teller_serno) {
		this.teller_serno = teller_serno;
	}
	public String getSequence() {
		return sequence;
	}
	public void setSequence(String sequence) {
		this.sequence = sequence;
	}
	public static long getSerialversionuid() {
		return serialVersionUID;
	}
	/**
	 * 覆盖hashCode方法，必须要有
	 */
	@Override
	public int hashCode() {
		final int PRIME = 31;
		int result = 1;
		result = PRIME * result + (trans_workdate == null ? 0 : trans_workdate.hashCode());
		result = PRIME * result + (teller_serno == null ? 0 : teller_serno.hashCode());
		result = PRIME * result + (sequence ==null ? 0 : sequence.hashCode());
		return result;
	}
	/**
	 * 覆盖equals方法，必须要有
	 */
	@Override
	public boolean equals(Object obj) {
		if(this == obj) return true;
		if(obj == null) return false;
		if(!(obj instanceof TransAccountListKey)) return false;
		TransAccountListKey objKey = (TransAccountListKey)obj;
		if(trans_workdate.equalsIgnoreCase(objKey.trans_workdate) &&
				teller_serno.equalsIgnoreCase(objKey.teller_serno) && 
				sequence.equalsIgnoreCase(objKey.sequence)) {
			return true;
		}
		return false;
	}


}
